package com.zhangxx.web.common.model;

public enum TradeStatus {

    TOTALAMOUNT_ERRER(500001,"订单总金额不正确"),
    LOGISTICSAMOUNT_ERRER(500002,"物流金额不正确"),
    NOT_FOUND_COUPON(500003,"优惠券不可用"),
    ADDRESS_ERRER(500004,"收货地址不正确"),
    GOODS_ERRER(500005,"商品不可用"),
    GOODS_COUNT_ERRER(500006,"购买数量不正确"),
    GOODS_PRICE_ERRER(500007,"商品价格不正确"),

    NOT_FOUND_ORDER(500008,"订单不存在"),
    ;

    private int code;

    private String message;

    private TradeStatus(int code, String message) {
        this.code = code;
        this.message = message;
    }

    public int value() {
        return code;
    }

    public String message() {
        return message;
    }

    @Override
    public String toString() {
        return Integer.toString(this.code);
    }
}
